home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / sound / aiff writer sdev / hardware.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  2.5 KB  |  67 lines

  1. /*
  2.     File:        Hardware.h
  3.  
  4.     Contains:    Headers for routines for dealing with virtual sound hardware from a
  5.                 'sdev' component.
  6.  
  7.     Written by: Mark Cookson    
  8.  
  9.     Copyright:    Copyright © 1993-1999 by Apple Computer, Inc., All Rights Reserved.
  10.  
  11.                 You may incorporate this Apple sample source code into your program(s) without
  12.                 restriction. This Apple sample source code has been provided "AS IS" and the
  13.                 responsibility for its operation is yours. You are not permitted to redistribute
  14.                 this Apple sample source code as "Apple sample source code" after having made
  15.                 changes. If you're going to re-distribute the source, we require that you make
  16.                 it clear in the source that the code was descended from Apple sample source
  17.                 code, but that you've made changes.
  18.  
  19.     Change History (most recent first):
  20.                 8/16/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  21.                 
  22.  
  23. */
  24.  
  25. #ifndef __HARDWARE__
  26. #define __HARDWARE__
  27.  
  28. #include <Errors.h>
  29. #include <Script.h>
  30. #include <SoundInput.h>
  31.  
  32. #ifndef __STRUCTURES__
  33. #include "Structures.h"
  34. #endif
  35.  
  36. #define kCreator    'Nqst'
  37. #define kFileType    'AIFF'
  38.  
  39. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  40. // Prototypes
  41. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  42. OSErr                    SetupHardware(SoundComponentGlobalsPtr globals);
  43. void                    ReleaseHardware(SoundComponentGlobalsPtr globals);
  44. void                    StartHardware(SoundComponentGlobalsPtr globals);
  45. void                    StopHardware(SoundComponentGlobalsPtr globals);
  46. void                    SuspendHardware(SoundComponentGlobalsPtr globals);
  47. void                    ResumeHardware(SoundComponentGlobalsPtr globals);
  48. void                    CopySamplesToHardware(SoundComponentGlobalsPtr globals, SoundComponentDataPtr siftPtr);
  49. void                    OutputToFile(SoundComponentGlobalsPtr globals, SoundComponentDataPtr siftPtr, void *dest, short sampleCount);
  50. Boolean                    FakeInterrupt(void);
  51. void                    InterruptRoutine(SoundComponentGlobalsPtr globals);
  52. SoundComponentDataPtr    GetMoreSource(SoundComponentGlobalsPtr globals);
  53. OSErr                    SetupOutputFile(SoundComponentGlobalsPtr globals);
  54. OSErr                    CloseOutputFile(SoundComponentGlobalsPtr globals);
  55. Handle                    NewHandleLockClear(long len, Boolean inSystemHeap);
  56. HardwareGlobalsPtr        GetHardwareGlobals(ComponentInstance self, Boolean inSystemHeap);
  57. OSErr                    SaveHardwareGlobals(ComponentInstance self, HardwareGlobalsPtr hwGlobals);
  58.  
  59. #if !GENERATINGPOWERPC
  60. void                    TMInterrupt(myTMTaskPtr taskPtr:__a1);
  61. unsigned long            MicroSeconds(void) = { 0xA193 };
  62. #else
  63. void                    TMInterrupt(myTMTaskPtr taskPtr);
  64. unsigned long            MicroSeconds(void);
  65. #endif
  66.  
  67. #endif //#ifndef __HARDWARE__